﻿using System.Web.Mvc;

namespace Zeus.Interop.SampleSite.Helpers
{
    public static class UrlHelperExtensions
    {
        public static int GetCustomerId(this UrlHelper urlHelper)
        {
            int customerId;

            if (!int.TryParse(urlHelper.RequestContext.HttpContext.Request.QueryString["customerId"], out customerId))
            {
                customerId = 1; // Don't actually do this in RL
            }

            return customerId;
        }
    }
}